import { ApiProperty, OmitType } from '@nestjs/swagger';
import { IsArray, IsString, IsNotEmpty } from 'class-validator';
import { CreateContentDto } from './create-content.dto';

export class CreateContentWithTagsDto extends OmitType(CreateContentDto, ['tagIds'] as const) {
  @ApiProperty({
    description: '标签名称列表',
    type: [String],
    example: ['工作效率', '时间管理', '生产力工具'],
  })
  @IsArray()
  @IsString({ each: true })
  @IsNotEmpty({ each: true })
  tagNames: string[];
}
